package com.hyjiacan.apps.audionly.data.model

/**
 * 音频参数实体类
 * @property bitRate 比特率(kbps)
 * @property sampleRate 采样率(Hz)
 * @property channels 声道数
 * @property format 音频格式
 * @property quality 音频质量(1-10)
 */
data class AudioParam(
    val bitRate: Int = 128,
    val sampleRate: Int = 44100,
    val channels: Int = 2,
    val format: String = "mp3",
    val quality: Int = 5
) {
    init {
        // 验证参数有效性
        require(bitRate > 0) { "Bit rate must be positive" }
        require(sampleRate > 0) { "Sample rate must be positive" }
        require(channels > 0) { "Channels must be positive" }
        require(quality in 1..10) { "Quality must be between 1 and 10" }
    }
}